package com.eugenes.design;

import org.joda.time.DateTime;

public class SkiPassEvent {
    public enum PassVerdict {
        GRANTED, DENIED;
    }

    final DateTime passTime;
    final String reason;
    final PassVerdict verdict;
    final Checkpoint checkpoint;

    // It is probably better to use builder pattern instead
    // but all information except reason is necessary
    public SkiPassEvent(DateTime passTime, PassVerdict verdict,
            Checkpoint checkpoint, String reasonString) {
        this.reason = reasonString;
        this.passTime = passTime;
        this.verdict = verdict;
        this.checkpoint = checkpoint;
    }

    public SkiPassEvent(DateTime passTime, PassVerdict verdict,
            Checkpoint checkpoint) {
        this(passTime, verdict, checkpoint, "Without any reasons :)");
    }

    // Pass verdict is public info.
    public PassVerdict getPassVerdict() {
        return verdict;
    }

    // Pass time is public info.
    public DateTime getPassTime() {
        return passTime;
    }

    // Reason is public info.
    public String getReasonString() {
        return reason;
    }
}
